<?php
session_start();
require '../nette/Nette/loader.php';
require '../db.php';
require '../localization/lang.php';
require '../core/core.sanitizer.php';
require '../core/core.security.php';
require '../core/core.dfs.php';
require '../visual/visual.dfs.php';
require '../core/core.time.php';
require '../core/core.statistics.php';



$login=new core_security;
if ($login->checklogin()=="OK" AND $_SESSION['role']<=1) {
$out="";
$id=split("_",$_POST['id']);
//echo $id[];
$query="select left_state,right_state from tree where ID= ".$id[1]."";
$result=mysql_query($query);
$row=mysql_fetch_array($result);
$left_state=$row['left_state'];
$right_state=$row['right_state'];

$query="select ID from tree where left_state > ".$left_state." AND right_state < ".$right_state."";
$result=mysql_query($query);
while ($row=mysql_fetch_array($result)) {
	$out=$out."#row_".$row['ID'].",";
	}
echo $out;
}
?>
